# -*- coding: utf-8 -*-
# @Time : 2023/11/30 8:29
# @Author : 王薪超
# @Email : 1517113428@qq.com
# @File : page_wxc_group.py
# @Project : wxczzb

from common.base_page import BasePage
from appium.webdriver.common.appiumby import AppiumBy
from time import sleep
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class Group(BasePage):
    btn_desktop_market = (AppiumBy.ID,'com.jhss.youguu:id/btn_desktop_market')#行情
    groups_btn = (AppiumBy.ID,'com.jhss.youguu:id/groups_btn')#全部
    TextView = (AppiumBy.XPATH,'//android.widget.TextView[@text="编辑分组"]')#编辑分组
    bottom_part = (AppiumBy.ID,'com.jhss.youguu:id/bottom_part')#新建分组
    modify = (AppiumBy.ID,'com.jhss.youguu:id/modify')#分组名称
    confirm = (AppiumBy.ID,'com.jhss.youguu:id/confirm')#确定

    def group_page(self):
        self.click_ele(self.btn_desktop_market)#点击行情
        sleep(1)
        self.click_ele(self.groups_btn)#点击全部
        sleep(1)
        self.click_ele(self.TextView)#点击编辑分组
        sleep(1)
        self.click_ele(self.bottom_part)#点击新建分组
        sleep(1)
        self.send_keys(self.modify,1)#输入分组名称
        sleep(1)
        self.click_ele(self.confirm)#点击确定
        sleep(1)



